import {  MENU_BUTTON_RECT_INFO, SYSTEM_WINDOW_INFO } from "./config";
import { computed, unref } from "vue";

//状态栏高度(px)
export const statusBarH=computed(()=>SYSTEM_WINDOW_INFO.statusBarHeight||25)
//标题栏高度
export const titleBarH=computed(()=>{
	
	const {top,height}=MENU_BUTTON_RECT_INFO;
	if(!top || !height) return 40
	return height + ((top-unref(statusBarH))*2)
})

//导航栏高度(总高度)
export const navBarH=computed(()=>unref(statusBarH)+unref(titleBarH))

export const useNavBarStyle= ()=>{
	const statusBarHeight=computed(()=>unref(statusBarH)+'px')
	const titleBarHeight=computed(()=>unref(titleBarH)+'px')
	const navBarHeight=computed(()=>unref(navBarH)+'px')
	return {
		titleBarHeight,
		statusBarHeight,
		navBarHeight
	}
}